package com.tjbklx1.redis.test1;

import java.util.ResourceBundle;

public class GetRedisConfigUtil {

	private static final ResourceBundle redisconf = java.util.ResourceBundle.getBundle("redisconfig");

	/**
	 * 
	 * 获得redis服务器地址
	 * 
	 * @return
	 */
	public static final String getUrl() {
		return String.valueOf(redisconf.getString("redisurl"));
	}

	/**
	 * 
	 * 获得redis服务器地址
	 * 
	 * @return
	 */
	public static final String getUrl2() {
		return String.valueOf(redisconf.getString("redisurl2"));
	}

	/**
	 * 
	 * 获得redis服务器端口
	 * 
	 * @return
	 */
	public static final int getPort() {
		return Integer.valueOf(redisconf.getString("redisport"));
	}

	/**
	 * 
	 * 获得redis服务器密码
	 * 
	 * @return
	 */
	public static final String getRedispass() {
		return String.valueOf(redisconf.getString("redispass"));
	}

	/**
	 * 
	 * 获得redis服务器端口
	 * 
	 * @return
	 */
	public static final int getPort2() {
		return Integer.valueOf(redisconf.getString("redisport2"));
	}

	public static final int getMaxActive() {
		return Integer.valueOf(redisconf.getString("redissetMaxActive"));
	}

	public static final int getMaxIdle() {
		return Integer.valueOf(redisconf.getString("redissetMaxIdle"));
	}

	public static final int getMaxWait() {
		return Integer.valueOf(redisconf.getString("redissetMaxWait"));
	}

	public static final boolean getTestOnBorrow() {
		return Boolean.valueOf(redisconf.getString("redissetTestOnBorrow"));
	}

	public static final boolean getTestOnReturn() {
		return Boolean.valueOf(redisconf.getString("redistestOnReturn"));
	}

	public static final int getDb() {
		return Integer.valueOf(redisconf.getString("server.database"));
	}

	public static final String getPassword() {
		return String.valueOf(redisconf.getString("server.database.password"));
	}

}